﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace Com.JunCaiSoft.Common.IDao
{
    public interface IGetDaoAsync<T> : IDataCoreAccessObjectAsync where T : class, new()
    {
        Task<T> GetAsync(object id);
        Task<T> GetAsync(Expression<Func<T, bool>> where);

        Task<TEntity> GetAsync<TEntity>(object id) where TEntity : class, new();
        Task<TEntity> GetAsync<TEntity>(Expression<Func<TEntity, bool>> where) where TEntity : class, new();
    }
}
